package com.ksana.orm.session;

import com.ksana.orm.executor.Executor;
import com.ksana.orm.executor.impl.DefaultExecutor;
import com.ksana.orm.proxy.MapperProxy;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.List;

/**
 * @author Fall
 */
public interface SqlSession {
    <T> T selectOne(Method statement, Object... parameters) throws Exception;

    <T> List<T> selectList(Method statement, Object... parameters) throws Exception;

    Integer insert(Method statement, Object... parameters) throws Exception;

    Integer update(Method statement, Object... parameters) throws Exception;

    Integer delete(Method statement, Object... parameters) throws Exception;

    <T> T getMapper(Class<T> cla);

    void commit() throws Exception;

    void rollback() throws Exception;
}
